import request from '@/utils/request'

/**
 * 调拨申请分页查询
 * @param {*} form
 * @param {*} pageSize
 * @param {*} currentPage
 */
export function dataList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/xcAllot/page', data)
}
/**
 * 新增
 * @param {*} options
 */
export function addData(options) {
  return request.post('/sq/xcAllot/save', options)
}
/**
 * 编辑
 * @param {*} options
 */
export function updateData(options) {
  return request.put('/sq/xcAllot/save', options)
}
/**
 * 删除
 * @param {*} id
 */
export function deleteData(id) {
  return request.delete(`/sq/xcAllot/del/${id}`)
}
/**
 * 根据id查询详情
 * @param {*} options
 */
export function details(id) {
  return request.get('/sq/xcAllot/detail/' + id)
}

/**
 * 根据id查询详情
 * @param {*} options
 */
export function findById(id) {
  return request.get('/sq/xcAllot/findById/' + id)
}

/**
 * 审核
 * @param {*} options
 */
export function apply(form={}) {
  return request.put('/sq/xcAllot/sh',form)
}
